const express = require('express')
// const bodyparser = require('body-parser')
let server = express()
server.listen(8080)
// server.use(bodyparser.urlencoded({
// 	extended: false,      //扩展模式
// 	limit: 2*1024*1024,   //限制2M
// }))
server.use(function(req,res,next){
	let str = ''
	res.on('data',function(data){
		str += data
	})
	res.on('end',function(){
		req.body = str
		console.log(req.body)
		next();
	})
})
server.use('/',function(req,res){
	console.log(req.body)
})

